package com.demo.xj_plane.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.xj_plane.dao.XjMesFcMapper;
import com.demo.xj_plane.entity.XjMesFcEntity;
import com.demo.xj_plane.service.XjMesFcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class XjMesFcServiceImpl extends ServiceImpl<XjMesFcMapper, XjMesFcEntity> implements XjMesFcService {
    @Autowired
    private XjMesFcMapper xjMesFcMapper;

    @Override
    public boolean selectExist(String cccc, String type, String issueDateTime) {
        // 判断是否有重复
        int i = xjMesFcMapper.selectExist(cccc, type, issueDateTime);
        if(i > 0){
            return true;
        }
        return false;
    }

    @Override
    public String selectLatestData(String cccc) {
        return xjMesFcMapper.selectLatestData(cccc);
    }

    @Override
    public List<String> selectContentLast24Hours(String issueDateTime) {
        return xjMesFcMapper.selectContentLast24Hours(issueDateTime);
    }
}
